package com.work.mybatis.mapper;

import java.lang.reflect.Type;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
/////
//接口用于实现sql中?参数的设置
/////
public interface TypeHandler<T> {
    /**
     * @param statement st
     * @param i 第几个参数赋值
     * @param value 参数值
     * @return void
     * @author WangPan
     * @date 2022/12/7 15:37
     */
    void setParameter(PreparedStatement statement, int i, T value) throws SQLException;
    /**
     * @description 在结果集里面获取对应字段的值
     * @param resultSet
     * @param columnName
     * @return T
     * @author WangPan
     * @date 2022/12/7 17:45
     */

    T getResult(ResultSet resultSet, String columnName) throws SQLException;

}
